const { create } = require("../service/user.service");
class UserController {
  async create(ctx, next) {
    console.log(ctx.request.body);
    const user = await create(ctx.request.body);
    ctx.body = { coder: 0, status: 201, data: { message: "用户创建成功", user } };
  }
  async resultUserInfo(ctx, next) {
    ctx.body = {
      code: 0,
      status: 200,
      data: {
        ...ctx.user
      }
    };
  }
}

module.exports = new UserController();
